const mongoose = require('mongoose')
//引入数据库
mongoose.connect('mongodb://localhost/lagou', {
  //遵循mongdb协议，地址是localhost，数据库名字随便改
  useNewUrlParser: true,
  useUnifiedTopology: true,
  useFindAndModify: false,
  useCreateIndex: true
});

module.exports = mongoose
//将mongoose数据库暴露